<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  async created() {
    // const allAccount = localStorage.getItem("allAccount");
    const allAccount = await this.$localStorage.getItem('allAccount')
    if (!allAccount) {
      const user = [
        {
          username: 'admin',
          password: '123456',
          avatar: require('@/icons/image/yyjcp-admin.png'),
          nickname: '管理员',
          role: 'admin',
          sex: '男',
          age: '30',
          phone: '18888888888',
          prov: '广东省',
          city: '深圳市',
          date: new Date()
        }
      ]
      await this.$localStorage.setItem('allAccount', user)
    }
  },
  methods: {}
}
</script>
